package com.qitmiaojie.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qitmiaojie.controller.utils.Result;
import com.qitmiaojie.pojo.User;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 *
 */
public interface UserService extends IService<User> {

   /* User getByUsername(String username);

    Result selectByUsers(String name, Integer currentPage, Integer size);

    Result selectByIdRole(Integer id);
    @Transactional
    Result updateByIdAndUserRole(Integer id, List<Integer> listIds);*/
   Result QueryUserByUserName(String UserName);

    Result QueryUsers(String name, Integer currentPage, Integer size);

    Result AddUser(User user);

    Result DeleteUser(Integer id);

    Result DeleteManyUser(Integer[] ids);

    Result QueryUserById(Integer id);

    Result UpdateUser(User user);

    Result QueryUserRole(Integer id);

    Result UpdateUserAuth(Map<String, Object> objectMap);

    Result ResetPassword(Integer id);

    Result ChangePassword(String name, String currentpassword, String password);

    User getByUsername(String username);
}
